import {onMounted, ref} from "vue";
import {getBannerApi} from "@/apis/homeApi.js";
// 获取banner 数据
export function useBanner() {
    const bannerList = ref([])
    const getBannerList = async () => {
        const res = await getBannerApi({distributionSite: '2'})
        bannerList.value = res.result
    }
    onMounted(() => getBannerList())
    return {
        bannerList
    }
}